<?php

namespace apiend\modules\user\controllers;

use Yii;
use apiend\components\Controller;
use apiend\modules\user\models\ConversationUserSearch;

/**
 * 获取接口会话列表用户信息
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class ConversationController extends Controller {

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            '*' => ['POST'],
        ];
    }

    /**
     * @inheritdoc
     */
    protected function rules() {
        return [
            [
                'allow' => true,
                'roles' => ['@'],
            ],
        ];
    }

    /**
     * 获取&设置会话列表中用户信息
     * @return mixed
     */
    public function actionIndex() {
        $model = new ConversationUserSearch();
        $model->load(Yii::$app->request->post(), '');
        return $model->search();
    }

}
